﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;

public partial class Page_UserGroup : Base.BasePage 
{



    private string initOrgan(DataTable dt)
    {
        //List<Organ> lst = new List<Organ>();
        //foreach (DataRow row in dt.Rows)
        //{
        //    Organ  item = new Organ
        //    {
        //        ORGAN_Text = row["ORGAN_ID"].ToString() + " " + row["ORGAN_NAME"].ToString(),
        //        ORGAN_KEY = row["ORGAN_KEY"].ToString() 
             
        //    };
        //    lst.Add(item);
        //}

        //return lst.ToJson();
        return "";
    }
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        string organJson = string.Empty;
        try
        {

//            if (Session["m_user_Organization"] != null)
//            {
//                organJson = initOrgan((DataTable)Session["m_user_Organization"]);

//            }
//            else
//            {

//                string sql = @"SELECT ORGAN_KEY, ORGAN_ID, ORGAN_NAME 
//                            FROM SBRM_ORGAN
//                            WHERE ACTIVE = 'Y' order by ORGAN_ID";
//                DataSet Ds = connObj.GetDataSet(sql.ToString());
//                DataTable dt = Ds.Tables[0];
//                Session["m_user_Organization"] = dt;
//                organJson = initOrgan(dt);
//                Ds.Dispose();
    
//            }
//            this.ClientScript.RegisterClientScriptBlock(this.GetType(), "organs", string.Format("var organs={0}", organJson), true);

        }
        catch (Exception ex)
        {

           // this.ClientScript.RegisterStartupScript(this.GetType(), "error", string.Format("BussinessObj.showMessage('{0}')", ex.Message.Replace("'", "")), true);

        }



    }



    protected void Page_Load(object sender, EventArgs e)
    {

    }
}
